import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '@/views/LoginView.vue'
import IndexView from '../views/IndexView.vue'
import RegisterView from '../views/RegisterView.vue'
import AppointmentView from '../views/AppointmentView.vue'
import HospitalView from '../views/HospitalView.vue'
import SetmealView from '../views/SetmealView.vue'
import SelectDataView from '../views/SelectDataView.vue'
import PersonalView from '../views/PersonalView.vue'
import ConfirmOrderView from '../views/ConfirmOrderView.vue'
import AppointmentAuccessView from '../views/AppointmentSuccessView.vue'
import AppointmentListView from '../views/AppointmentListView.vue'
import ForgetView from '../views/ForgetView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: LoginView,
    },
     {
       path: '/index',
       name: 'index',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
       component: IndexView,
     },
     {
       path: '/register',
       name: 'register',
       component: RegisterView,
     },
     {
       path: '/appointment',
       name: 'appointment',
       component: AppointmentView,
     },
     {
       path: '/hospital',
       name: 'hospital',
       component: HospitalView,
     },
     {
       path: '/setmeal',
       name: 'setmeal',
       component: SetmealView,
     },
     {
       path: '/selectdata',
       name: 'selectdata',
       component: SelectDataView,
     },
     {
       path: '/personal',
       name: 'personal',
       component: PersonalView,
     },
     {
       path: '/confirmorder',
       name: 'confirmorder',
       component: ConfirmOrderView,
     },
     {
       path: '/appointmentsuccess',
       name: 'appointmentsuccess',
       component: AppointmentAuccessView,
     },
     {
       path: '/appointmentlist',
       name: 'appointmentlist',
       component: AppointmentListView,
     },
     {
       path: '/forget',
       name: 'forget',
       component: ForgetView,
     }
  ],
})

export default router
